package org.icop.frame.search.virtualdoc;

import java.util.Collection;

import org.icop.frame.search.Searcher;
import org.icop.utils.AnnotationHandler;
import org.icop.virtdoc.ContextVirtualDoc;
import org.icop.virtdoc.VirtualDoc;
import org.jbpt.graph.abs.IDirectedEdge;
import org.jbpt.graph.abs.IDirectedGraph;
import org.jbpt.hypergraph.abs.IVertex;

/**
 * Does the same as the StandardVirtualDocForComponentSearcher
 * except that it uses context virtual documents instead of
 * standard virtual documents.
 * 
 * @author matthias.weidlich
 *
 */
public class ContextVirtualDocForComponentSearcher<G extends IDirectedGraph<E,V>, E extends IDirectedEdge<V>, V extends IVertex> extends StandardVirtualDocForComponentSearcher<G, E, V> implements Searcher<G, E, V> {

	public ContextVirtualDocForComponentSearcher(int componentDepth, double cutoff, boolean doWrapup, boolean noNtoMMatches, boolean no1toNMatches) {
		super(componentDepth,cutoff,doWrapup,noNtoMMatches,no1toNMatches);
	}
	
	@Override
	protected VirtualDoc getVirtualDocForNodes(G g, Collection<V> nodes) {
		return new ContextVirtualDoc<G, E, V>(g, nodes, AnnotationHandler.getAnnotationsForGraph(g));
	}
}
